package net.dgg.tmd.foundation.platform;

import cn.dgg188.ossservice.annotaion.DggEnableOSS;
import net.dgg.framework.tac.kafka.annotation.DggEnableKafka;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;

/**
 * 系统启动类
 *
 * @author nature
 * @create 2018-02-05 9:36
 *
 */
@SpringBootApplication
@DggEnableOSS
@DggEnableKafka
@ImportResource(locations = {"classpath:spring/spring-context.xml"})
@MapperScan("net.dgg.zz.api.credential.mapper")
public class ScStartApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(ScStartApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(ScStartApplication.class, args);
        System.out.println("************************************************************");
        System.out.println("*                                                          *");
        System.out.println("*                   服 务 启 动 成 功                      *");
        System.out.println("*                                                          *");
        System.out.println("************************************************************");

        /*JSONObject jsonObject = new JSONObject();
        jsonObject.put("orderId","1234567");
        jsonObject.put("content","你好，生产订单XXXX更新");
        jsonObject.put("userId","123123");
        jsonObject.put("userName","张三张三");
        jsonObject.put("loginName","111111");
        boolean b = DggMessageSendUtil.putMessage("net.dgg.iboss.orf.order2.OrderButlerChangeEvent", jsonObject);
        System.err.println(b);*/
    }
}
